05. Catkin Workspace

Catkin Workspace

To program your home service robot, you will need to interface it with different ROS packages. Some of these packages are official ROS packages which offer great tools and others are packages that you’ll create. The goal of this section is to prepare and build your catkin workspace.

Here’s the list of the official ROS packages that you will need to grab, and other packages and directories that you’ll need to create at a later stage as you go through the project. Your catkin_ws/src directory should look as follows:

Official ROS packages

Import these packages now and install them in the src directory of your catkin workspace. Be sure to clone the full GitHub directory and not just the package itself.

  1. gmapping: With the gmapping_demo.launch file, you can easily perform SLAM and build a map of the environment with a robot equipped with laser range finder sensors or RGB-D cameras.
  2. turtlebot_teleop: With the keyboard_teleop.launch file, you can manually control a robot using keyboard commands.
  3. turtlebot_rviz_launchers: With the view_navigation.launch file, you can load a preconfigured rviz workspace. You’ll save a lot of time by launching this file, because it will automatically load the robot model, trajectories, and map for you.
  4. turtlebot_gazebo: With the turtlebot_world.launch you can deploy a turtlebot in a gazebo environment by linking the world file to it.

Your Packages and Directories

You’ll install these packages and create the directories as you go through the project.

  1. World: Inside this directory, you will store your gazebo world file and the map generated from SLAM.
  2. ShellScripts: Inside this directory, you’ll store your shell scripts.
  3. RvizConfig: Inside this directory, you’ll store your customized rviz configuration files.
  4. wall_follower: You will store a wall_follower node that will autonomously drive your robot around to perform SLAM.
  5. pick_objects: You will write a node that commands your robot to drive to the pickup and drop off zones.
  6. add_markers: You will write a node that model the object with a marker in rviz.

Catkin Workspace Setup

Task Description:

Follow these instructions to prepare your catkin_ws/src directory for the project. Check off each step as you complete it!

Task List:

Task Feedback:

Great Job!

Package Tree

Here's a high level overview of how you catkin_ws/src directory should look like:

    ├──                                # Official ROS packages
    |
    ├── slam_gmapping                  # gmapping_demo.launch file                   
    │   ├── gmapping
    │   ├── ...
    ├── turtlebot                      # keyboard_teleop.launch file
    │   ├── turtlebot_teleop
    │   ├── ...
    ├── turtlebot_interactions         # view_navigation.launch file      
    │   ├── turtlebot_rviz_launchers
    │   ├── ...
    ├── turtlebot_simulator            # turtlebot_world.launch file 
    │   ├── turtlebot_gazebo
    │   ├── ...
    ├──                                # Your packages and direcotries
    |
    ├── World                          # world files
    │   ├── ...
    ├── ShellScripts                   # shell scripts files
    │   ├── ...
    ├──RvizConfig                      # rviz configuration files
    │   ├── ...
    ├──wall_follower                   # wall_follower C++ node
    │   ├── src/wall_follower.cpp
    │   ├── ...
    ├──pick_objects                    # pick_objects C++ node
    │   ├── src/pick_objects.cpp
    │   ├── ...
    ├──add_markers                     # add_marker C++ node
    │   ├── src/add_markers.cpp
    │   ├── ...
    └──

Troubleshooting

Q: What if my catkin_ws failed to build?

A: There may be many reasons as to why your catkin_ws failed to build! Here are some common solutions to this problem:

  • Make sure you installed all the package dependencies with rosdep -i install <package name>.
  • Make sure you only have a single version of each package.
  • You can save your old catkin_ws and start over with a new one.
  • Look at the messages being generated on your terminal to identify the error.